/** @file admm.h
 *
 *  @author Dongryeol Lee (dongryel@cc.gatech.edu)
 */

#ifndef MLPACK_ADMM_ADMM_H
#define MLPACK_ADMM_ADMM_H

#include <boost/math/distributions/normal.hpp>
#include <boost/mpi/communicator.hpp>
#include <boost/program_options.hpp>
#include <boost/scoped_array.hpp>

#include "core/data/matrix_dataset.h"
#include "mlpack/admm/admm_arguments.h"
#include "mlpack/admm/admm_result.h"
#include "mlpack/admm/admm_sub_problem_solver.h"

namespace mlpack {
namespace admm {

class ADMM {

  public:

    ~ADMM();

    ADMM();

    /** @brief Initialize an ADMM engine with the arguments.
     */
    void Init(
      boost::mpi::communicator &world_in,
      mlpack::admm::ADMMArguments &arguments_in);

    void Compute(
      const mlpack::admm::ADMMArguments &arguments_in,
      mlpack::admm::ADMMResult *result_out);

  private:

    /** @brief The solver.
     */
    mlpack::admm::ADMMSubProblemSolver *solver_;

    /** @brief The communicator.
     */
    boost::mpi::communicator *world_;
};
}
}

#endif
